package cn.edu.lingnan.fruitshop.service;

import cn.edu.lingnan.fruitshop.pojo.Ordertable;
import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.ui.Model;

import javax.servlet.http.HttpSession;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 张小凡
 * @since 2022-01-04
 */
public interface OrdertableService extends IService<Ordertable> {

    /**
     *
     * @return
     */
    String creatOrder(Model model,Integer orderId,Integer addressId,HttpSession session);

    String pay(Model model,Integer orderId,Integer addressId,HttpSession session) throws AlipayApiException;

    /**
     * 跳转用户订单界面
     * @param model
     * @param session
     * @return
     */
    String toUserCenterOrder(Model model, HttpSession session,Integer currentPage, Integer pageSize);

    /**
     * 根据订单id把 订单详情和订单 删除掉
     * @param id
     * @return
     */
    String deleteOrder(Model model,HttpSession session,Integer id,Integer currentPage);
}
